toDynamicFluidSp

fun Number.toDynamicFluidSp(context: Context, qualifier: DpQualifier, fontScale: Boolean = true, inverter: Inverter = Inverter.DEFAULT, ignoreMultiWindows: Boolean = false, applyAspectRatio: Boolean = false, customSensitivityK: Float? = null): Float

EN Converts an Int (base Sp) to a dynamically scaled Sp value (as Float).

Return

The scaled Sp value as Float.

Bulk / init: see toDynamicFluidSpPx for DimenCache.getBatch and DimenFluidSp.warmupCache.

Parameters

context

The Android context to access configuration and density.

qualifier

The screen qualifier used for scaling (sw, h, w).

fontScale

Whether to respect the system font scale.

inverter

The inverter logic to apply.

ignoreMultiWindows

Whether to ignore multi-window mode.

applyAspectRatio

If true, applies the aspect-ratio multiplier.

customSensitivityK

Override for the AR sensitivity constant (null = library default).